home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_1 / lissajou < prev    next >
Text File  |  1995-03-31  |  3KB  |  89 lines

  1. Article 1537 of comp.sys.handhelds:
  2. Path: en.ecn.purdue.edu!pur-ee!mentor.cc.purdue.edu!purdue!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!snorkelwacker!mit-eddie!ll-xn!rsteele
  3. From: rsteele@XN.LL.MIT.EDU (Rob Steele)
  4. Newsgroups: comp.sys.handhelds
  5. Subject: HP-48 Movie
  6. Message-ID: <1753@xn.LL.MIT.EDU>
  7. Date: 15 Mar 90 21:50:41 GMT
  8. Reply-To: rsteele@LL-XN.ARPA.ll.mit.edu (Rob Steele)
  9. Organization: MIT Lincoln Laboratory
  10. Lines: 75
  11.  
  12. The following code plots a series of lissajous and animates them.
  13. It is possible to see the resulting figure in about eleventy-
  14. two different ways: cylindrical or flat, rotating or oscillating
  15. about a horizontal or vertical axis, moving toward you or
  16. away, moving to the left or to the right, or just wobbling.
  17.  
  18. I call the program LLL for Lincoln Lab Lissajous since the lissajous
  19. is our logo.  To work it, download or enter it and press the GEN
  20. button.  It will run for a few minutes and beep when it's through.
  21. Then press the SHO button and watch.  Finally, press any key to quit.
  22.  
  23. If you have trouble seeing the image in different ways, try focusing
  24. on a single intersection in the plot as it moves.  Pretend that the
  25. point is in front as it moves in one direction and in back when it
  26. goes the opposite way.  Once you get that to work, reverse directions.
  27.  
  28. Rob Steele
  29. rsteele@xn.ll.mit.edu
  30.  
  31. All orginizations that are not actually right-wing will over time
  32. become left-wing.
  33.                       -- O'Sullivan's Law
  34.  
  35.  
  36.  
  37. LLL -- 609.5 bytes, # 93CEh checksum
  38.  
  39. %%HP: T(3)A(D)F(.);
  40. DIR
  41.     GEN \<<
  42.         @ Generates a list of graphic objects and
  43.           stores them in IMAGES.
  44.         @
  45.         RCLF DEG
  46.         0 'IMAGES' STO
  47.         30 90 FOR i
  48.             i 'Z' STO
  49.             ERASE DRAW PICT RCL
  50.         10 STEP
  51.         7 \->LIST 'IMAGES' STO
  52.         STOF
  53.         1250 1 BEEP
  54.     \>>
  55.  
  56.     SHO \<<
  57.         @ Displays the graphic objects in IMAGES in rapid
  58.           succession.
  59.         @
  60.         IMAGES SIZE \-> n
  61.         \<<
  62.             ERASE { # 0h # 0h } PVIEW
  63.             MEM DROP
  64.             WHILE KEY NOT REPEAT
  65.                 1 n 1 - FOR i
  66.                     PICT {  # 0h # 0h } 'IMAGES' i GET REPL
  67.                 NEXT
  68.                 n 2 FOR i
  69.                     PICT {  # 0h # 0h } 'IMAGES' i GET REPL
  70.                 -1 STEP
  71.             END
  72.             DROP
  73.         \>>
  74.     \>>
  75.  
  76.     @ Definition of the lissajous.  Set Z to zero to produce the
  77.       Lincoln logo.
  78.     @
  79.     EQ 'SIN(4*x+Z)+COS(3*x)*i'
  80.  
  81.     Z 0
  82.  
  83.     PPAR { (-3,-1) (3,1) { x 0 360 } 0 (10,10) PARAMETRIC Y }
  84.  
  85.     IMAGES 0
  86. END
  87.  
  88.  
  89.